home *** CD-ROM | disk | FTP | other *** search
-
- +--------------------------------------------------------------------------+
- | Documentation for GetType 1.14b |
- | |
- | Program & related files are copyright © 1997-1999 Andrew Bell. |
- | |
- | Homepage: http://www.homeusers.prestel.co.uk/ab2000 |
- | |
- | email: andrew.ab2000@bigfoot.com |
- | |
- +--------------------------------------------------------------------------+
-
-
- ----------------------------------------------------------------------------
- DISCLAIMER
- ----------------------------------------------------------------------------
-
- BY USING THIS PROGRAM THE USER ACCEPTS FULL LIABILITY FOR ANY DAMAGE THAT
- COULD POSSIBLY BE CAUSED BY ITS USAGE OR MISUSE. THE AUTHOR OF THIS SOFTWARE
- CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE.
-
- THIS PROGRAM IS PROVIDED AS-IS. USE THIS PROGRAM AT YOUR OWN RISK.
-
- (After all, you did get it for free!)
-
- ----------------------------------------------------------------------------
- DISTRIBUTION
- ----------------------------------------------------------------------------
-
- IT IS PROHIBITED TO DISTRIBUTE GETTYPE WITHOUT THE FOLLOWING FILES:
-
- GetType/GT
- GetType/GT.doc
- GetType/GT.readme
- GetType/GT_Types.txt
- GetType/Libs/Idm.library
- GetType/Libs/Idm.library.readme
- GetType/Libs/FileID.library
-
- GETTYPE IS FREE, AND NO PROFIT SHOULD BE MADE FROM DISTRIBUTING IT.
-
- ----------------------------------------------------------------------------
- OVERVIEW
- ----------------------------------------------------------------------------
-
- GetType is a CLI/Shell program that enables the user to identify files via
- a Shell/DOS prompt. It requires an 020 processor or better, and at least
- version 39 (aka OS3.x) of the Amiga operation system. It also needs
- Idm.library version 1 or later.
-
- The actual identification work is done by Idm.library (and FileID.library /
- xfdmaster.library), currently this library recognizes over 1100 filetypes.
-
- Using the UFID and UXFD, you check now check files with a database of over
- 2000 filetypes.
-
- I recommend using an 030 CPU or better.
-
- ----------------------------------------------------------------------------
- INSTALLATION
- ----------------------------------------------------------------------------
-
- Simply copy the executable (GT) to the C: drawer, and Idm.library to the
- LIBS: drawer. Copy FileID.library to LIBS: also, but check to see if you
- already have a higher version already installed, if so you don't need to
- install it.
-
- If you have xfdmaster.library or xvs.library installed then GetType
- can take advantage of these systems. See USAGE section for more details.
-
- ----------------------------------------------------------------------------
- PROGRAM USAGE
- ----------------------------------------------------------------------------
-
- Once installation has been completed, you can now start the program. Simply
- type GT at the Shell/DOS prompt to start it.
-
- The command line is as follows:
-
- ---> DIR/M <---
-
- Use this parameter to provide the locations of the files and dirs to
- scan.
-
- ---> ALL/S <---
-
- Enter into sub-directories. When using this option the output can be a
- little confusing on big HDs with deep directory trees.
-
- If you don't like the output, consider using the LFMT parameter. The
- ALL option is not really designed to be used with the default output.
-
- ---> HL_U/S <---
-
- Highlight unknown files.
-
- ---> HL_K/S <---
-
- Highlight known files.
-
- ---> HELP/S <---
-
- A simple help page giving details on the parameters.
-
- ---> INFO/S <---
-
- More information on the currently installed version of Idm.library.
-
- ---> TYPES/S <---
-
- Display a (very long) list of all the filetypes known to the currently
- installed version of Idm.library. If this list is too long, then press
- CONTROL+C to break.
-
- ---> IDPAT/K <---
-
- An AmigaDOS pattern/wildcard string, used for finding certain filetypes.
- For example, if you wanted to view only the filetypes recognized by
- FileID.library then type something similar to this:
-
- GT <PutPathHere> <PutOptionsHere> UFID IDPAT=FID:#?
-
- Note: Uppercase and lowercase are both treated as the same.
-
- ---> DGEN/S <---
-
- Display general filetypes (Executable/Data) instead of a question mark '?'.
-
- ---> SC=SETCOMMENT/S <---
-
- Set file's comment with identification string. Don't use this feature if
- you place great value on your file comments.
-
- ---> SI=SHOWICONS/S <---
-
- Show #?.info files. By default GetType does not show icon files.
-
- ---> IOLEN/N <---
-
- Specify a new read length. This value sets the amount of bytes to be loaded
- off the start of each file, while scanning. Idm.library requires GT to load
- about 2Kb from the start of each file in order to identify it. By using
- this option you can force GT to load a smaller amount of bytes from each
- file, doing this will result in less files being identified but a faster
- performance.
-
- Any number below 4 will become 4.
-
- NOTE: If you use the UFID option the IOLEN parameter will be forced to at
- least 1200 bytes. This is required because FileID.library needs a
- minimum of 1200 bytes to be loaded off the start of each file, to
- ensure a proper identification check.
-
- This is also the same for xfdmaster.library, about 5KB is required
- for proper identification when using the UXFD=USEXFD/S parameter.
-
- For the best result, don't use either the UFID or UXFD parameters with the
- IOLEN parameter.
-
- ---> UFID=USEFILEID/S <---
-
- Tells GT to use FileID.library for any unknown filetype encountered. v8+ of
- this library is required. Any IDs made by this library will have a 'FID:'
- prefix for clarity (except for LFMT's %2 code).
-
- ---> LFMT/K <---
-
- Perhaps one of GTs more powerful parameters, using this parameter allows
- the user to create simple script/batch files or configure the output. At
- the moment the default output is very ugly, so you might want to consider
- using this option :) especially if you are using DOpus, DirWork, etc.
-
- This parameter is similar to the LIST command's LFORMAT parameter. The user
- will pass a formatted string and GT will parse it with the desired
- information.
-
- So for example if we wanted to delete all StoneCracker compressed files
- in the C: drawer, we could type the following at a Shell prompt:
-
- GT c: all lfmt="delete %p%n FORCE" idpat=#?stc#? >ram:tempscriptfile
- execute ram:tempscriptfile
- delete ram:tempscriptfile
-
- In order to build the output string via the LFMT parameter we need
- to know what format components codes are available:
-
- %% = insert a literal % character
- %P = insert full path (same as %p%n, eg: dh0:mydrawer/myfile)
- %p = insert path string (eg: dh0:mydrawer/)
- %n = insert filename string (eg: myfile)
- %l = insert entry type string (eg: F, LF, PF, etc.)
- %s = insert size in bytes string (eg: 153432)
- %S = insert size string (rounds off lengths to K, MB, GB, etc.)
- %i = insert primary identifcation string.
- %1 = insert identification result of Idm.lib
- %2 = insert identification result of FileID.lib (without FID: prefix)
- %3 = insert identification result of GT name matching.
- %4 = insert identification result of xfdmaster.lib (without XFD: prefix)
- %5 = insert identification result of xvs.lib (without XVS: prefix)
- %c = insert file comment.
- %b = insert the amount of blocks the file takes up.
-
- If you insert a '-' and THREE decimal digits immediately after the '%' you
- can specify the width in characters you wish the string to fill. The
- remainder of the string will be padded with spaces. This will let you
- create more readable strings, but is not much use when creating script
- files (as shown above).
-
- Remember when using the '-' symbol that you MUST put three decimal digits
- after it. So NEVER use %-8n, use %-008n instead.
-
- If you want a full path use %P and not %p%n, remember these format codes
- are case sensitive. I hear you ask: What is the point of having %P when
- %p%n does the same job? Well the answer is: %P works better with the
- '-' symbol. Simple.
-
- If the string is bigger than the number you pass with the '-' symbol, then
- the bounds will be broken. If you want to limit the amount of characters
- inserted, then you can append a '.' (period) followed by a THREE digit
- number that will specify the maximum allowed characters.
-
- It you need spaces in your LFMT string remember to enclose it in "double
- quotes" (eg: LFMT="File %n is %i").
-
- If all this seems complicated, thats because it is :) This parameter is
- for the advanced Amiga user only.
-
- Believe it or not, but you can create a more readable GT output by using:
-
- gt dh0: all lfmt="%-040.040P %-028.028i %s" dgen
-
- ---> FIDTYPES/S <---
-
- Display a (very long) list of all the filetypes known to the currently
- installed version of FileID.library. If this list is too long, then press
- CONTROL+C to break.
-
- ---> NNM=NONAMEMATCH/S <---
-
- Since version 1.12, GT now attempts to identify files via their names.
- Passing this option will force GT not to do any name matching. For
- example, GT is able to recognize a standard Amiga run-time libary by
- checking to see if the name matches *.library. The NONAMEMATCH option
- will disable this method of identification.
-
- ---> NAMETYPES/S <---
-
- Display all known name prefixes/extensions (aka name types) types known
- internally to GetType. Since v1.12 GT has its own internal database of
- common filename prefixes/extensions, using this, GT can dertermine basic
- filetypes. Passing this option GT will enable you to see all known
- prefixes/extensions known to GT.
-
- ---> REQ/S <---
-
- This will enable you to force the output to a requester instead of the
- Shell window. To use this option you must specify the LFMT parameter.
- The LFMT parameter is used to construct the body text of the requester.
- If you want a newline inside the requester use a *n or a \n inside the
- LFMT string.
-
- For example: gt c: LFMT="%P\n\nIdentification is:\n\n%i" REQ DGEN
-
- Notes:
-
- 1. Currently the requester is opened on the default public screen.
- 2. Each line is centred, there is currently *NO* way around this! But
- using the '-' after an LFMT code might solve this problem.
-
- Some people may prefer this option, especially if DOpus or DirWork is
- being used.
-
- ---> UXFD=USEXFD/S <---
-
- If you supply this argument, GT will use the powerful xfdmaster.library
- to scan for compressed files. You *MUST* have the XFD system setup
- correctly on your system to take advantage of this parameter.
-
- The XFD system is currently maintained by Dirk Stöcker and the lastest
- version can be found on the Aminet at: util/pack/xfdmaster.lha.
-
- ---> XE=XFDEXTERN/S <---
-
- Tell xfdmaster.library to use the external slaves. For more information
- on the external slave system used by XFD, please refer to the XFD
- documentation.
-
- There is no point in using this parameter if you are not using the
- UXFD=USEXFD/S parameter.
-
- ---> XFDTYPES/S <---
-
- Display a (very long) list of all the cruncher types known to the currently
- installed version of xfdmaster.library. If this list is too long then press
- CTRL+C to break.
-
- ---> CFV=CHECKFORVIRUSES/S <---
-
- Since GT 1.14, if you supply this argument, GT will use the powerful
- xvs.library to scan for viruses. You *MUST* have the XVS system setup
- correctly on your system to take advantage of this parameter.
-
- Any viruses encountered will be prefixed with XVS: (except when using the
- LFMT paramter).
-
- GetType only identifies viruses and does NOT kill them, nor does it
- attempt to fix your files. This is up to you. If GetType finds a virus
- on your system then I recommend that you check the files in question
- with an up to date virus killer.
-
- Note: Using this feature will greatly slow down GT, because the whole
- file is loaded into memory.
-
- The XVS system is currently maintained by Georg Hörmann and the lastest
- version can be found on the Aminet.
-
- ---> XVSTYPES/S <---
-
- Display a (very long) list of viruses known to the current version of
- xvs.library. Bootblocks viruses are not shown. If this list is too
- long then press CONTROL+C to break.
-
- ----------------------------------------------------------------------------
- INFORMATION & EXTRA NOTES
- ----------------------------------------------------------------------------
-
- GT (by default) does not display icon files, use the SI=SHOWICONS/S option
- to override this. If you notice some short pauses while running GT, this is
- normally the icon files (#?.info) being skipped.
-
- For each release of Idm.library the IOLEN can change. For Idm.library v1.85
- it stands at 1470 bytes. This might seem like a lot but since harddrives are
- getting faster these days, who cares?
-
- The output of GT will be faster if a console patch like KingCON is not used.
- (KingCON tends to slow down while updating its scroller gadget and history
- text buffer)
-
- If scanning big harddrives I recommend you redirect the output of GT, for
- example: GT dh0: all >ram:GT_output.txt, doing this will make life faster :)
- It will also give you a big output file! So make sure you have a lot of
- spare storage space in the destination drawer.
-
- ----------------------------------------------------------------------------
- THE OUTPUT
- ----------------------------------------------------------------------------
-
- Here is an example of GetTypes output in Shell window:
-
- Store:Visual/
-
- Spin.IFF - IFF ILBM picture - F 5420
- test1.anim8L - IFF Animation file - F 13080
- test1.anim5 - IFF Animation file - F 9258
- XenonII_sprites.ilbm - IFF ILBM picture - F 9110
- Monsters of Terror - IFF ILBM picture - F 33068
- walkman - IFF ILBM picture - F 18554
- SampleFont_EMCVol8.ilbm - IFF ILBM picture - F 11570
- samplegfx01.ilbm - IFF ILBM picture - F 32220
-
- (END OF DIR)
-
- The output is divided into four sections these are:
-
- 1. File name - Name of the file processed.
- 2. Identification - Identification of the file.
- 3. File entry type - This will be one of the following:
-
- RT = ST_ROOT
- UD = ST_USERDIR
- SL = ST_SOFTLINK
- LD = ST_LINKDIR
- F = ST_FILE
- LF = ST_LINKFILE
- PF = ST_PIPEFILE
- ?? = Unknown type
-
- RT, UD, SL, LD will not appear in this version of GT.
-
- 4. File length - Length of the file in bytes
-
-
- ----------------------------------------------------------------------------
- HOW GETTYPE WORKS
- ----------------------------------------------------------------------------
-
- GetType uses a standard Amiga run-time library known as Idm.library, (short
- for IDentification Master). This library holds the actual information
- required by GT to determine a file's type.
-
- When you run GT, GT loads Idm.library into memory. GT then scans each file
- in the specified directory and loads a certain amount of bytes off every
- one it encounters. It then passes this data to Idm.library which then
- attempts to identify the file via a process called DNA (for lack of a better
- word) matching.
-
- Most data files produced by applications normally contain some sort of an ID
- string, for example an OctaMED module would contain the one of the following
- DNA strings at offset 0 into the file: MMD0, MMD1, MMD2 or MMD3. Idm.library
- contains many such DNA strings, each DNA string has a description associated
- with it, this is what you see if Idm.library is able to match a DNA string.
-
- But a major problem with this method is, there's a very high rate of
- incorrect matches! Say for example you create a text file and at the VERY
- beginning (that means no spaces or newlines) of this file you typed
- 'AMOS Basic V1.00' (must be exactly as you see it here without the quotes!)
- Idm.library would pick this up as an AMOS source code file when you scan
- the directory that this text file resides in with GT. But we know that this
- is just a simple text file. So the user (thats you!) must use his or her's
- common sense to determine what GT matches are correct and what matches are
- not correct.
-
- ----------------------------------------------------------------------------
- COPYRIGHT
- ----------------------------------------------------------------------------
-
- GetType is copyright © 1999 Andrew Bell. This software is FREEWARE.
-
- Commercial use of this program (and related files) is prohibited.
-
- FileID.library is copyright © 1998 Oliver Lange (BLOODROCK). Full package
- can be found on Aminet: utils/libs dir.
-
- ----------------------------------------------------------------------------
- PROGRAM HISTORY
- ----------------------------------------------------------------------------
-
- History for GT versions 1.0-1.9 not documented, early test versions.
-
- 1.10 (31.Jan.1999) - Aminet release.
-
- o First public release via Aminet.
-
- 1.11 (07.Feb.1999) - Aminet release.
-
- o Idm.library 1.19 had a bug in it that stop it from working with OS40
- (WB3.1) or greater. This was a very stupid bug. Delete this version if
- you encounter it.
- o Some minor changes made to the main program.
- o Cleaned up the document, looks nicer :-)
- o GT now shows the amount of files hidden from view.
- o Removed tabs from the help page.
- o Added LFMT parameter.
- o Now includes version 8 of FileID.library. Thanks Darek!
- o Add FIDTYPES options.
- o The help page stated in 1.10 that GT required Idm.library version 0,
- this is wrong it should have been version 1.
-
- 1.12 (18.Feb.1999) - Aminet release.
-
- o GT is now able to determine a file's type via its filename.
- o Added NNM=NONAMEMATCH/S parameter.
- o Added NAMETYPES/S parameter.
- o Extended LFMT parameter, added %1, %2 and %3 format codes.
- o For completeness I added support for C style newlines \n in the LFMT
- parameter.
- o The output of GT can now be forced to a WB requester by using the
- REQ/S parameter.
- o More minor internal changes.
- o GT has more tolerance now when it comes to errors. It won't quit
- on the first error it encounters, instead it will attempt to
- continue with the scan.
- o You can now pass more then one file/dir name to GT in a single command
- line. This makes GT more powerful when used with DOpus or DirWork.
- o Extended the LFMT parameter by adding the %c format code. This will
- enable you to insert file comments into the output.
- o Also added the %b code to the LFMT parameter, this enables the user
- to insert the amount of blocks a file takes up.
- o For convenience, I added GT_Types.txt to the archive.
-
- 1.13 (26.Apr.1999) - Aminet release.
-
- o GT did not check the OS version before starting - Whoops!
- o You can now use the powerful xfdmaster.library by Georg Hörmann & Dirk
- Stöcker to check for compressed files that Idm.library does not know.
- The following parameters have been added to enable the user to bring in
- xfdmaster.library: UXFD=USEXFD/S, XE=XFDEXTERN/S and XFDTYPES/S. GT now
- has a large database of filetypes!
- o LFMT has been extended, it now supports XFD. Use LFMT code %4 to
- obtain the result of xfdmaster.library.
- o The INFO parameter has been extended. It now displays more information.
- o GT now breaks first time (CTRL+C) when the user specifies many #?TYPES
- parameters (eg: GT TYPES FIDTYPES NAMETYPES XFDTYPES).
- o GT now has EVEN MORE tolerance when it comes to errors.
- o Fixed some spelling mistakes in the document. I type too fast :)
- o Made some minor internal changes and optimizations.
-
- 1.14 (13.Aug.1999) - Limited beta release.
-
- o Reworked GT's exit and cleanup routines.
- o Source code ported to the Hisoft/Maxon C++ compiler.
- o I made a lot of internal changes.
- o Some extra nametypes added.
- o Due to requests, directories are now displayed in the output.
- o Virus checking added, via xvs.library. This feature can be activated
- with the CFV=CHECKFORVIRUSES/S parameter.
- o Added the XVSTYPES/S parameter for listing all virus types known to
- xvs.library.
- o Extended INFO/S option to include information about xvs.library.
- o Extended the LFMT parameter to support xvs, use LFMT code %5 to
- obtain the result of xvs.library.
- o The ALL/S now tells the user what directory it's entering, leaving
- or continuing with.
- o Removed some potential enforcer hits, when an empty file was encountered
- and the LFMT parameter was being used.
- o Fix a small bug concerning the USEXFD/S parameter.
- o Extended the HELP/S parameter list to include new xvs options.
- o If GT can't lock a dir, it now displays the name the dir with and error
- instead of just saying "object not found" or similar.
- o Totally reworked the printing routines inside GT. As a result output
- speed has increased by about 5-10% - /me thinks :).
- o Extended the internal nametypes routines. GetType now attempts to
- identify a file via it's prefix, not just the suffix/extension.
- o Added lots of filetype prefixes to the database. Mostly music module
- formats, for now.
- o Updated NAMETYPES/S parameter to show prefix database.
- o All the listing options (TYPES, NAMETYPE, XFDTYPES, ...) now count
- from 1. This makes life less confusing :)
- o Some extra bits added to the doc.
- o GetType now includes it's compile time, right down to the second -
- thanks to the Maxon compiler. This can be seen in the help page (use
- the HELP/S parameter). Hmm, I wonder if that can be considered a
- feature :)
-
- 1.14b (15.Aug.1999) - Aminet release.
-
- o Fixed a small bug. GetType was printing an incorrect figure at the end
- of the scan. The amount of entries processed figure, did not include
- directories.
-
- ----------------------------------------------------------------------------
- ADDITION INFORMATION
- ----------------------------------------------------------------------------
-
- GetType is not pure nor re-entrant. So don't even think about making it
- resident. Maybe future versions will support this, but this one does not,
- because generating such code makes the executable bigger (Well, using my
- methods anyway!).
-
- But what's the point in making programs resident these days when HDs are
- so fast?
-
- ----------------------------------------------------------------------------
- TODO
- ----------------------------------------------------------------------------
-
- AmigaGuide / HTML documentation!
-
- Maybe an installer script, but the package is still small.
-
- Config file, so the user does not have to type the same parameters at the
- Shell prompt every time when starting GT.
-
- Add a format code to the LFMT parameter that will enable the user to insert
- the file's date into the output string.
-
- ----------------------------------------------------------------------------
- THANKS
- ----------------------------------------------------------------------------
-
- To Oliver Lange (aka BLOODROCK) for creating FileID.library.
-
- To Dariusz Gac for helping me solve the problems with v1.10 and for giving
- me the idea for the LFMT parameter. Also, sorry for spelling your name wrong
- in the 1.11 docs :)
-
- To Rick Hodger for helping me test GT and his bug reports.
-
- To Dirk Stöcker for pointing out various problems Idm.library was having
- identifying some files. Thanks also for maintaining the XFD system and
- sharing your knowledge on various compressed (+ archive) file formats.
-
- To Georg Hörmann for creating the XFD system (And making it one of the
- easiest systems to program - wish I could say the same about Idm.library :)
-
- To StarBlazer for his suggestions on Idm.library. Maybe they will be
- implemented in v2 of Idm.library (Yes, I'm still working on it!).
-
- To James L Boyd for testing Idm.library with Blitz Basic 2. And sending
- loads of developer stuff for Blitz.
-
- To Richard Lane for allowing me to use filetypes from his excellent
- Magnum Opus package.
-
- <--- your name could be here :) --->
-
- Thanks to all of those people who bothered to send bug reports and offered
- suggestions. Sorry if I forgot about you.
-
- ----------------------------------------------------------------------------
- THE AUTHOR
- ----------------------------------------------------------------------------
-
- send info, filetypes, bug reports, ideas, suggestions, anything, etc. too:
-
- Andrew Bell : andrew.ab2000@bigfoot.com
-
- (remember to put 'GetType' in the subject)
-
- Visit: http://www.homeusers.prestel.co.uk/ab2000
- to get the latest release of this program and to see all of my other work.
-
-
-